﻿using System;
using System.Runtime.InteropServices;

namespace Calculate
{
    [Guid("D25650E2-730D-42f0-A4C5-8A52C97C86FB")]
    public class Calculate : IObjectSafety
    {
        public decimal Add(decimal a, decimal b)
        {
            return a + b;
        }
        public decimal Minus(decimal a, decimal b)
        {
            return a - b;
        }
        public decimal Multiply(decimal a, decimal b)
        {
            return a * b;
        }
        public decimal Divide(decimal a, decimal b)
        {
            return a / b;
        }

        public void GetInterfacceSafyOptions(int riid, out int pdwSupportedOptions, out int pdwEnabledOptions)
        {
            pdwSupportedOptions = 1; 
            pdwEnabledOptions = 2;
        }

        public void SetInterfaceSafetyOptions(int riid, int dwOptionsSetMask, int dwEnabledOptions)
        {
            //throw new NotImplementedException();
        }
    }
}
